class Solution {
public:
    int jumpFloor(int n) {
        int a = 1, b = 2, i = 3, c = 0;
        if (n == 1 || n == 2) return n;
        while (i++ <= n) {
            c = a + b;
            a = b; 
            b = c;
        }   
        return c;
    }
};